package com.zpz.framework.zpzoauth.service;

import com.github.pagehelper.PageInfo;
import com.zpz.framework.zpzoauth.common.result.ZpzOauthResultMsg;
import com.zpz.framework.zpzoauth.pojo.qo.*;
import com.zpz.framework.zpzoauth.pojo.vo.AddRoleInfoQo;
import com.zpz.framework.zpzoauth.pojo.vo.GetRoleInfoVo;
import com.zpz.framework.zpzoauth.pojo.vo.RoleDropdownListVo;
import com.zpz.framework.zpzoauth.pojo.vo.RoleManageVo;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
/**
 * @author zhangpanzhi
 * @time 2019-07-09
 * @description 未经本人允许请勿随便改动，尊重劳动
 * */
public interface ZpzOauthFrameRoleService {
    /**
     * 获取当前用户角色列表
     *
     * @param
     * @return
     */
    ZpzOauthResultMsg<List<String>> getRoleCodeByUserCode(HttpServletRequest request, GetRoleCodeByUserCodeListQo getRoleCodeByUserCodeListQo) throws Exception;

    /**
     * 新增角色信息
     *
     * @param
     * @return
     */
    ZpzOauthResultMsg<Integer> addRole(HttpServletRequest request, AddRoleInfoQo addRoleInfoQo) throws Exception;

    /**
     * 新增角色信息
     *
     * @param
     * @return
     */
    ZpzOauthResultMsg<Integer> editRole(HttpServletRequest request, ModifyRoleInfoQo modifyRoleInfoQo) throws Exception;


    /**
     * @name: getRoleDropdownList
     * @description:获取角色下拉列表信息
     * @returnType: java.util.List<com.auyan.framework.users.model.vo.RoleDropdownListVo>
     * @createBy: changyifan
     * @createDate: 2019-05-16 05:41:48
     * @updateBy:
     * @updateDate:
     * @param: []
     * @throws Exception
     */
    ZpzOauthResultMsg<List<RoleDropdownListVo>> getRoleDropdownList(HttpServletRequest request, GetClientQo getClientQo) throws Exception;

    /**
     * @name: uopdateRoleState
     * @description:修改角色启用状态
     * @returnType: com.auyan.framework.common.result.ResultMsg<java.lang.Boolean>
     * @createBy: changyifan
     * @createDate: 2019-05-17 02:00:45
     * @updateBy:
     * @updateDate:
     * @param: [roleStateQo]
     * @throws Exception
     */
    ZpzOauthResultMsg<Boolean> updateRoleState(HttpServletRequest request, RoleStateQo roleStateQo) throws Exception;
    /** @Author fengxm
     * @NAME 查询角色管理列表
     * @Description //TODO
     * @Date 2019/5/17 14:11
     * @param roleManageQo
     * @return com.github.pagehelper.PageInfo<com.auyan.framework.users.model.vo.RoleManageVo>
     */
    ZpzOauthResultMsg<PageInfo<RoleManageVo>> selectRoleMangePageList(HttpServletRequest request, RoleManageQo roleManageQo);
    /**
     * @Author fengxm
     * @NAME 删除角色相关信息
     * @Description //TODO
     * @Date 2019/5/17 17:07
     * @param deleteRoleInfoQo
     * @return com.auyan.framework.common.result.ResultMsg<java.lang.Boolean>
     */
    ZpzOauthResultMsg<Boolean> deleteRoleInfo(HttpServletRequest request, DeleteRoleInfoQo deleteRoleInfoQo);

    /**
     * @Author fengxm
     * @NAME 根据角色编码获取角色信息
     * @Description //TODO
     * @Date 2019/5/17 17:07
     * @param roleCode
     * @return com.auyan.framework.common.result.ResultMsg<java.lang.Boolean>
     */
    ZpzOauthResultMsg<GetRoleInfoVo> getRoleInfoByCode(String roleCode) throws Exception;
}
